// app.js
const router = require("./utils/router.js").router;
const request = require("./utils/request.js").request;
App({
  onLaunch() {
    request(router.authDetail, "GET", {}).then(function(res) {
      const rootAuth = res.data.data.root;
      const managerAuth = res.data.data.manager;
      wx.setStorageSync('root', rootAuth);
      wx.setStorageSync('manager', managerAuth);
    }).catch(function(errMsg) {
      wx.setStorageSync('root', 0);
      wx.setStorageSync('manager', 3);
    })
  },

  globalData: {
    userInfo: null
  }
})
